<div class = "container">
    <div class="row">
        <div class="col-md-7 col-md-offset-2">
            <div class="row">
                <legend>Upravljanje predavanjima u okviru kursa {{nameOfActivity}} </legend>
                <a class="btn btn-primary" href="#/activity/{{idActivity}}">
                    <span class="glyphicon glyphicon-chevron-left"></span> 
                    Nazad
                </a>
                <button class="btn btn-success pull-right" ng-if="choise == true" ng-click="addNew(eventName, eventDescription, eventVenue, eventTime, eventDate)">
                    Dodaj
                    <span class="glyphicon glyphicon-ok"></span> 
                </button>
            </div>
            <br>
            
           <ul class="nav nav-tabs" >
                <li ng-if="choise == true" class="active"><a href="" ng-click="noviEnko()">Novi</a></li>
                <li ng-if="choise == true"><a href="" ng-click="postojeciEnko()" >Postojeći</a></li>
                <li ng-if="choise == false"><a href="" ng-click="noviEnko()">Novi</a></li>
                <li ng-if="choise == false" class="active"><a href="" ng-click="postojeciEnko()">Postojeći</a></li>
            </ul>
<br>
            <div id="Novi" ng-if="choise == true">
                <div class="form-group">
                        <label for="acName">Ime predavanja</label>
                        <input type="text" class="form-control" ng-model="event.Name" required /> {{eventName}}
                    </div>
                    <div class="form-group">
                        <label for="acDesc">Opis predavanja</label>
                        <textarea class="form-control" name="acDesc" id="acDesc" rows="10" ng-model="event.Description" required /> {{eventDescription}}
                    </div>
                    <div class="form-group">
                        <label>Mesto održavanja</label>
                        <input type="text" class="form-control" ng-model="event.Venue" required /> {{eventVenue}}
                    </div>
                    <div class="form-group col-md-6">
                        <label>Datum održavanja</label>
                        <input type="date" class="form-control" ng-model="event.Date" required /> {{eventDate}}
                    </div>
                    <div class="form-group col-md-6">
                        <label>Vreme održavanja</label>
                        <input type="time" class="form-control" ng-model="event.Time" required /> {{eventTime}}
                    </div>
                    <div class="row"></div>

            </div>
            <div id="Postojeci" ng-if="choise == false">
                <ul class="list-group">
                    <li class="list-group-item" ng-repeat="event in eventsShort">
                        <a href="#/event/{{event.idActivity}}">{{event.name}}</a>
                        <a class="btn btn-danger btn-xs pull-right" ng-click="removeEvent(event.idEvent, idActivity)" ng-if="event.isMember == 1">Ukloni</a>
                        <span class="pull-right"> &nbsp;</span>
                        <a class="btn btn-success btn-xs pull-right" ng-click="add(event.idEvent, idActivity)" ng-if="event.isMember == 0">Dodaj</a> 
                        
                    </li>
                </ul>
                {{selected}}
            </div>
            <div class="row"></div>

        </div>
    </div>
</div>

<!--
<h1>{{nameOfActivity}}</h1>
Tip Eventa: <br/>
<select ng-model="choiseNew" ng-options="item.Name for item in choises ">
</select>
<a class="btn btn-primary btn-large" href="#/activity/{{idActivity}}"> Vrati se </a>
<br/>
<br/>
<div ng-if="choiseNew.Value == true">
    <p > Ime </p>
    <input type="text" ng-model="eventName"  /> {{eventName}}
    <br/>
    <p > Opis </p>
    <textarea name="acDesc" id="acDesc" cols="30" rows="10" ng-model="eventDescription" required></textarea> {{eventDescription}}
    <br/>
    <p > Mesto odrzavanja </p>
    <input type="text"  ng-model="eventVenue" /> {{eventVenue}}
    <br/>
    <p > Date </p>
    <input type="date" ng-model="eventDate" />{{eventDate}}
    <br/>
    <p> Time </p>
    <input type="text" ng-model="eventTime"  /> {{eventTime}}
    <br/>
    <a class="btn btn-success btn-large" ng-click="addNew(eventName, eventDescription, eventVenue, eventTime, eventDate)" > Dodaj </a>
</div>
<div ng-if="choiseNew.Value == false">
    <h2>{{loading}}</h2>
    <ul>
        <li ng-repeat="event in eventsShort">
            <a href="#/event/{{event.idActivity}}">{{event.name}}</a>
            <a class="btn btn-success btn-large" ng-click="add(event.idEvent, idActivity)" ng-if="event.isMember == 0"> Dodaj </a>
            <a class="btn btn-danger btn-large" ng-click="removeEvent(event.idEvent, idActivity)" ng-if="event.isMember == 1"> Ukloni </a>
        </li>
    </ul>
    {{selected}}
</div>
<br/>



-->

















